/**
 * 
 */
package org.codehaus.groovy.grails.plugins.autodelegator.example.service;

import org.codehaus.groovy.grails.plugins.autodelegator.annotation.Delegate;

/**
 * @author <a href="mailto:franz.see@gmail.com">See, Franz Allan Valencia</a>
 *
 */
public class ServiceWithDynamicMethod{

	@Delegate
	private ServiceWithUninvokedDynamicMethod serviceWithUninvokedDynamicMethod;
	
	public void setServiceWithUninvokedDynamicMethod(ServiceWithUninvokedDynamicMethod serviceWithUninvokedDynamicMethod) {
		this.serviceWithUninvokedDynamicMethod = serviceWithUninvokedDynamicMethod;
	}
		 
	def dynamicHello() {
		'hello ServiceWithDynamicMethod'
	}
	
	ServiceWithDynamicMethod() {
		ServiceWithDynamicMethod.metaClass.hello = this.&dynamicHello;
    }
	
	
}
